package com.alibaba.citrus.cr.mn.order.center.facade.service.impl;

import com.alibaba.citrus.cr.mn.order.center.autofulfillmentorder.service.AutoFulfillmentOrderService;
import com.alibaba.lattice2.epoch.sdk.model.Result;
import com.epoch.app.mnordercenter.autofulfillmentorderbiz.dto.RetryAutoFulfillmentOrderRequest;
import com.epoch.app.mnordercenter.autofulfillmentorderbiz.service.AutoFulfillmentOrderBizService;
import com.epoch.app.mnordercenter.model.dto.ForecastBizAsyncResponse;
import com.epoch.app.mnordercenter.model.dto.ForecastOrderBizBatchCreateRequest;
import com.epoch.app.mnordercenter.model.dto.RetryAutoFulfillmentOrderResponse;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author baizhuo
 * @version 1.0
 * @date 2023/8/24 16:19
 */
@Service
@Primary
public class AutoFulfillmentOrderBizServiceImpl implements AutoFulfillmentOrderBizService {

    @Resource
    private AutoFulfillmentOrderService autoFulfillmentOrderService;

    @Override
    public Result<ForecastBizAsyncResponse> createAutoFulfillmentOrders(ForecastOrderBizBatchCreateRequest forecastOrderBizBatchCreateRequest) {
        return autoFulfillmentOrderService.createAutoFulfillmentOrders(forecastOrderBizBatchCreateRequest);
    }

    @Override
    public Result<RetryAutoFulfillmentOrderResponse> retryAutoFulfillmentOrder(RetryAutoFulfillmentOrderRequest retryAutoFulfillmentOrderRequest) {
        return autoFulfillmentOrderService.retryAutoFulfillmentOrder(retryAutoFulfillmentOrderRequest);
    }

}
